package top.dingyingying.springboot3.service;

import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;

public class BaseApiService {
    public static final String ID = "wefwfwrfw";
    public static final String SECRET = "dfnduhwhuefw";
    public static  final String HISTORY_URL ="https://www.mxnzp.com/api/history/today?type=$s";

    /**
     * 构建http请求头,里面包含了认证信息
     *
     * @return http请求头
     */
    public HttpEntity<String> buildHttpEntity(){
       HttpEntity<String> httpEntity;
        HttpHeaders headers = new HttpHeaders();
       headers.add("app_id", ID);
       headers.add("app_secret", SECRET);
       httpEntity = new HttpEntity<>("",headers);
       return httpEntity;
    }
}
